What's in the files?

The fValidate zip archive contains several files. In the current version, there are 14 JS files, one PHP file, and a readme.txt. It is recommended that you unzip all the JS files into one location, and the PHP file (if you intend on using it) into a common includes folder or something of that nature.

The Files

fValidate.core.js

This file contains all of the core functionality to fValidate, such as the main validation routine, object sniffing, prototyped methods and error handling. This file is required.

fValidate.config.js

This file contains all the variable data that fValidate uses. For more details about the contents of this file, visit the config page. This file is required.

fValidate.validators.js

This file contains all the current validator type methods and some special commenting syntax that helps me split it up into the modularized files you see below. This file is optional.

fValidate.lang-enUS.js

This is the fValidate language file. All US-English used by this script is contained in this one file. It can be replaced by any other language file available, but you must include a language file. This file is required.

fValidate.basic.js

These are the basic validator types - used for the simplest of form validations.

  • blank
  • length

This file is optional.

fValidate.extended.js

These extend the basic set to include some types that are common to many forms.

  • alnum
  • zip
  • ssn
  • phone

This file is optional.

fValidate.numbers.js

Validators for handling numeric validation

  • number
  • numeric
  • decimal
  • decimalr

This file is optional.

fValidate.logical.js

Validators for handling logical validation tasks.

  • equalto
  • eitheror
  • atleast
  • allornone
  • comparison

This file is optional.

fValidate.controls.js

These handle all non-text form controls.

  • select
  • selectm
  • selecti
  • checkbox
  • radio
  • file

This file is optional.

fValidate.web.js

Common web-oriented datatypes are handled with this file.

  • email
  • url
  • ip

This file is optional.

fValidate.datetime.js

Date and time oriented validators.

  • date

This file is optional.

fValidate.international.js

Any non-US, country-specific validators here (what can I say, I'm from the US smile)

  • cazip
  • ukpost
  • germanpost
  • swisspost

This file is optional.

fValidate.ecommerce.js

Ecommerce related validators here

  • money
  • cc

This file is optional.

fValidate.special.js

Unique and special validators

  • custom

This file is optional.

fValidate.server.php

This PHP file will serve fValidate to your web pages with a single script include. It will allow you to load as many modules (read: files) as you like, and even has an option for compressing the output (removes comments and such). This file is optional.

Why the modularity? There are close to 30 validator types and I doubt anybody uses all of them in one form. I don't want you to have to include all this code just for a few of them.